package com.webbei.HAO.action;

import java.io.IOException;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionSupport;
import com.webbei.HAO.service.ChSer;

public class ConfirmUser extends ActionSupport {
	private ChSer ser;
	private String str;
	private String username;

	public String execute() {
		/*str = "true";
		if (ser.customercheck2(username) != 0) {
			str = "false";
		}*/
		if(ser.customercheck2(username)!=0){
			try {
				ServletActionContext.getResponse().getWriter().write("false");
				ServletActionContext.getResponse().setContentType("text/html");
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}else{
			
			try {
				ServletActionContext.getResponse().getWriter().write("true");
				ServletActionContext.getResponse().setContentType("text/html");
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
		return null;
	}

	public void setSer(ChSer ser) {
		this.ser = ser;
	}

	public String getStr() {
		return str;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public ChSer getSer() {
		return ser;
	}

	public String getUsername() {
		return username;
	}

	public void setStr(String str) {
		this.str = str;
	}
	

}
